package com.cwz.core.annotation;

import com.cwz.core.config.ApplicationConfig;
import com.cwz.core.feign.FeignAutoConfiguration;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;

import java.lang.annotation.*;

/**
 * @program: w-demo
 * @description: 全局配置启动注解
 * 				 包括切面、配置类加密、异步调用、包扫描等等
 * @author: Wen
 **/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
// 被 @Inherited 注解修饰的注解，如果作用于某个类上，其子类是可以继承的该注解的
@Inherited
// 将在整个Spring环境中启用可加密属性
@EnableEncryptableProperties
// 表示通过aop框架暴露该代理对象,AopContext能够访问
@EnableAspectJAutoProxy(exposeProxy = true)
@EnableAsync
@ComponentScan("com.cwz")
// 自动加载类
@Import({ApplicationConfig.class, FeignAutoConfiguration.class})
public @interface EnableGlobalConfig {
}
